package bishi._58tongcheng;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2021/09/25 19:32
 */
public class two {
    public int[] rec (int[][] results) {
        // write code here
        Set<Integer> set = new HashSet<>();
        for(int[] i:results){
            for(int j:i) set.add(j);
        }
        int[] res = new int[set.size()];
        List<Integer> list = new ArrayList<>(set);
        list.sort((i1,i2)->i2-i1);
        int index = 0;
        for(int i:list){
            res[index++] = i;
        }
        return res;
    }
}
